package cn.itsource.pethome.base.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class JsonResult {
    private Boolean success = true;
    private String msg;

    //返回到前台的数据
    private Object result;


    public JsonResult(Boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    /**
     * 设置返回到前端的数据
     */
    public JsonResult setResult(Object result){
        this.result = result;
        return this;
    }


}
